package com.example.douyinproject;

import android.util.Log;

import androidx.fragment.app.Fragment;

import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;

/*工具类：联网碎片工具*/
public class BaseFragment extends Fragment implements Callback.CommonCallback<String > {
    public void connectNetwork(String url) {
        RequestParams params = new RequestParams(url);
        x.http().get(params,this);
    }

    @Override
    public void onSuccess(String result) {

    }

    @Override
    public void onError(Throwable ex, boolean isOnCallback) {
        Log.i("shanzhikai","onError: ex=="+ex.getMessage());
    }

    @Override
    public void onCancelled(CancelledException cex) {

    }

    @Override
    public void onFinished() {

    }
}